Skip to content

Conversation

@karlseguin
Copy link
Collaborator

No description provided.

Copy link
Contributor

@sjorsdonkers sjorsdonkers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return .{ .inner = .{ .entries = &self.entries } };
}

pub fn _symbol_iterator(self: *const FormData) EntryIterable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi I can't find this a spec online..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure how to read the spec here, but it does mention: iterable<USVString, FormDataEntryValue>.

MDN lists the iterator here: https://developer.mozilla.org/en-US/docs/Web/API/FormData#browser_compatibility

And, a quick test in browser shows that the form data is iterable:

let f = new FormData()
f.set('a', '1');
for (entry of f) console.log(entry)

will print Array [ "a", "1" ]

@karlseguin karlseguin merged commit eff1341 into main May 15, 2025
9 checks passed
@karlseguin karlseguin deleted the form_data branch May 15, 2025 09:34
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants